# Contributor: Feng Shu <tumashu@163.com>

_realname=rime-terra-pinyin
pkgbase=mingw-w64-${_realname}
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
pkgver=0.0.0.20210805
_commit=aefaf372b25febbf4d5f9443bd284d3dd6876085
pkgrel=1
pkgdesc="Terra pinyin for rime"
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32')
url="https://github.com/rime/rime-terra-pinyin"
license=('LGPL')
# dependency for reverse lookup
depends=("${MINGW_PACKAGE_PREFIX}-rime-stroke")
source=("https://github.com/rime/rime-terra-pinyin/archive/${_commit}/rime-terra-pinyin-${_commit}.tar.gz")
sha512sums=('82c85b73725d45cb894aa9a356aef907e2f2d5923be0145ee950ba1465a566dec16934c7f1fd512701c2990ab1111d1ec4f7073ad9c1be5f7ed04c7007506e61')

package() {
  cd "rime-terra-pinyin-${_commit}"
  install -Dm644 *.yaml -t "${pkgdir}${MINGW_PREFIX}/share/rime-data/"
}
